import VueRouter from "vue-router";
import Vue from "vue";
import HmLogin from "@/views/HmLogin.vue";
import HmRegister from "@/views/HmRegister.vue";
import HmLayout from "@/views/HmLayout.vue";
import HmInterview from "@/views/HmInterview.vue";
import HmCollect from "@/views/HmCollect.vue";
import HmLike from "@/views/HmLike.vue";
import HmUser from "@/views/HmUser.vue";
import HmRecommend from "@/views/HmRecommend.vue";
import HmNew from "@/views/HmNew.vue";
import HmNotfound from "@/views/HmNotfound.vue";
import HmDetial from "@/views/HmDetial.vue";
Vue.use(VueRouter);
const router=new VueRouter({
    routes:[
        {path:'/',redirect:'/login'},
        {path:'/login',component:HmLogin},
        {path:'/register',component:HmRegister},
        {path:'/layout',component:HmLayout,
            children:[
                {path:'/layout/interview',component:HmInterview,
                    children:[
                        {path:'/layout/interview/recommend',component:HmRecommend},
                        {path:'/layout/interview/new',component:HmNew}
                    ]
                },
                {path:'/layout/collect',component:HmCollect},
                {path:'/layout/like',component:HmLike},
                {path:'/layout/user',component:HmUser}
            ]
        },
        { path: '/detial', component: HmDetial },
        {path:'*',component:HmNotfound}
    ]
})
export default router;